from flask import Flask, Response

app = Flask(__name__)

@app.route('/mock', methods=['GET'])
def mock_response():
    # 指定响应体内容
    response_body = '{"msg":"此服务由API测试独家部署"}'
    # 指定响应码
    status_code = 200
    # 指定响应头
    headers = {
        'Content-Type': 'application/json',
        'DPA': 'APITEST'
    }
    return Response(response_body, status=status_code, headers=headers)

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000)